package com.success.course;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@MapperScan("com.success.course.mapper")
@EnableTransactionManagement//这是开启事务
@EnableFeignClients("com.success.hrm.feignclients")//调用fenifn还必须有这个标签
public class CourseServerApplication2020
{
    public static void main( String[] args )
    {
        SpringApplication.run(CourseServerApplication2020.class);
    }

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
